//
//  MBProgressHUD+LZCustomMBProgressHUD.m
//  laziz_Consumer
//
//  Created by XMac on 16/10/31.
//  Copyright © 2016年 XBN. All rights reserved.
//

#import "MBProgressHUD+LZCustomMBProgressHUD.h"

@implementation MBProgressHUD (LZCustomMBProgressHUD)

+(MBProgressHUD *)showAndSetup:(UIImage *)image text:(NSString *)text context:(UIView *)context{
    MBProgressHUD *hub = [MBProgressHUD showHUDAddedTo:context animated:YES];
    hub.mode = MBProgressHUDModeCustomView;
    hub.customView = [[UIImageView alloc]initWithImage:image];
    
    hub.label.font = [UIFont systemFontOfSize:15];
    hub.label.textColor = UIColorFromRGB(0xffffff, 1);
    hub.label.text = text;
    
    hub.minSize = CGSizeMake(182, 111);
    hub.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
    
    hub.bezelView.color = UIColorFromRGB(0x000000, 0.4);
    
    return hub;
}

@end
